package com.ruoyi.school.handler.wall;

import com.ruoyi.school.domain.PacActualOutput;
import com.ruoyi.school.domain.vo.HonorWallTopThreeVo;
import com.ruoyi.school.service.PacActualOutputService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
@RequiredArgsConstructor
public class PracticeWallStrategy implements WallStrategy {
    private final PacActualOutputService pacActualOutputService;

    @Override
    public void audit(AuditDetails details) {
        PacActualOutput output = new PacActualOutput();
        output.setId(details.getAuditRecordId());
        output.setAcAudit(details.getAcAudit());
        pacActualOutputService.audit(output);
    }

    /**
     * 获取荣誉墙 前三
     *
     * @param builder
     */
    @Override
    public List<HonorWallTopThreeVo> getTopThree(WallTopThree builder) {
        return pacActualOutputService.getTopThree(builder);
    }

    /**
     * 获取学生的 荣誉列表
     *
     * @param wallTopThree
     * @return
     */
    @Override
    public List<HonorWallTopThreeVo> getStuHonorList(WallTopThree wallTopThree) {
        return pacActualOutputService.getStuHonorList(wallTopThree);
    }
}